<!--apps/frontend/modules/templates/indexSuccess.php -->
<h2>Events Index</h2>
<?php foreach($events as $event): ?>

<div class="event-item">
  <h3><?php echo $event->getTitle() ?></h3>
  <ul>
    <?php foreach($event->getOccurrences() as $occurrence): ?>
      <li><?php echo $occurrence->getDate()?> - <?php echo $occurrence->getLocation() ?></li>
    <?php endforeach;?>
  </ul>
  <a href="<?php echo url_for('event/edit?id='.$event->getId())?>">edit event</a>
</div>
<?php endforeach; ?>

<a href="<?php echo url_for('@new')?>">Add an Event</a>